<?php
use yii\helpers\Html;
//use ua_backend\models\Images;
use yii\helpers\Url;
/* @var $this \yii\web\View */
/* @var $content string */

//$onOff = \common\models\SysSetting::findOne(1);
$role  =  Yii::$app->user->identity->role;
$code  = '';
//if($role == 30){
//    $admin = \ua_backend\models\Admin::findOne(Yii::$app->user->id);
//    $code = '<span style="color: #555555">登录码：'.$admin->code.'</span>';
//}

$mainTitle = 'UA Retail';
?>

<header class="main-header">

    <?= Html::a('<span class="logo-mini"><img src="/images/logo.jpg" width="30"></span><span style="font-family: SimHei, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif">'.$mainTitle.'</span>', Yii::$app->homeUrl, ['class' => 'logo']) ?>

    <nav class="navbar navbar-static-top" role="navigation">

        <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
            <span class="sr-only">Toggle navigation</span>
        </a>

        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
                <li class="header">
                    <div style="color: #FFF; padding: 15px;"><?=$code?></div>
                </li>
                <li class="dropdown user user-menu">
                    <?= Html::a('<i class="fa fa-power-off"> </i> '.Yii::t('app', 'Sign out').'', ['/site/logout'], ['data-method' => 'post', 'class' => 'btn btn-sm pull-right'])." ";
                    ?>
                </li>

            </ul>
        </div>
    </nav>
</header>
